package ga.selection;

import ga.model.Chromosome;

import java.util.ArrayList;
import java.util.Random;

public class SUS implements Selection {
	Random rand=new Random();
	@Override
	public Chromosome[] selectPatents(ArrayList<Chromosome> population) {


		int sum=0;
		for (Chromosome chromosome : population) {
			sum+=chromosome.getFitness();	
		}
		double avg=sum/population.size();
		
		double doubl=rand.nextDouble();
		
		for (Chromosome chromosome : population) {
			chromosome.setExpVal(chromosome.getFitness()/avg);	
		}
		
		
		int sum1=0;
		for(int i=0; i<population.size();++i)
			
			
		
		
		
		return null;
	}

}
